import {createStore} from 'redux'

import { composeWithDevTools } from '@redux-devtools/extension';

const enhancer = composeWithDevTools()
const reducer = function(state,action){

    return state;
}

let userInfo = localStorage.getItem('userInfo')
try{
    userInfo = JSON.parse(userInfo) || {}
}catch(err){
    userInfo = {}
}

const initState = {
    userInfo,
    // ....
}
const store = createStore(reducer,initState,enhancer)

export default store;